<template>
    <a-modal class="my-modal short" v-model="modal_show" title="设置任务状态" @ok="modelok" @cancel="modelcancel" width="400px" :maskClosable="false" :centered="true">
        <div class="body-content">
            <div v-show="set_type=='task_show_simple'">
                <label>任务状态：</label>
                <a-select style="width: 120px" @change="task_status_change" allowClear v-model="input_value"   size="small">
                    <a-select-option :value="item.status" v-for="(item,index) in $store.state.task_status" :key="index" >{{item.name}}</a-select-option>
                </a-select>
            </div>
            <span>
               
            </span>
        </div>
    </a-modal>
</template>
<script>
export default {
    components: {},
    data() {
        return {
            modal_show: false,
            set_type:"",
            input_value:"",
            prop:"",
        };
    },
    mounted() {
        this.$mitt.$off('set_status').$on('set_status', _options => {
            this.set_type=_options.type
            this.input_value=_options.val
            this.prop=_options.other
            this.modal_show = true;
        });
    },
    methods: {
        modelcancel(){``
            this.modal_show = false;
        },
        task_status_change(){
            
        },
        modelok() {
            this.$mitt.emit("set_status_back",{
                type:this.set_type,
                val:this.input_value,
                other:this.prop
            })
            this.modal_show = false;
        },
    },
};
</script>
<style></style>
